package st.business.tepth.business.user;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.business.tepth.business.bean.LocationBean;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;

/**
 * @author zhangyu
 * @date 2019/3/5
 */
public interface UserContract {
    interface View extends BaseView {
        void showLocationInfo(LocationBean locationBean);
        void offWorkSucceed();
        void showError(String msg);
    }

    interface Model extends BaseModel {
        Disposable getLocationInfo(String id,
                                   String token,
                                   OnDataConvertListener<LocationBean> listener);
        Disposable offWork(String token,OnDataConvertListener<String> listener);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void getLocationInfo(String id, String token);

        abstract void offWork(String token);
    }
}
